<html> 
<head> 
<title>Select Database</title> 
</head> 
<body> 
<?php 

$debug= 1;
$vquery=$_POST['myquery']; 
$vquery=str_replace("\\", "", $vquery);

$username = "fossilplot";
$password = "fossilplot";
$hostname = "localhost"; 

//connection to the database
$dbhandle = mysql_connect($hostname, $username, $password)
 or die("Unable to connect to MySQL");


//select a database to work with
$selected = mysql_select_db("fossilplot",$dbhandle)
  or die("Could not select examples");

print $vquery."<br>";
 $result = mysql_query($vquery)
 or die ("It is not an valid SQL query, please check your query and search again.");
 
while ($row = mysql_fetch_array($result)) {
 print "hello";
}



mysql_close($dbhandle);

?>
</body> 
</html>